//
//  ImportSelectView.m
//  JinFuThree
//
//  Created by 毛韶谦 on 2018/9/4.
//  Copyright © 2018年 毛韶谦. All rights reserved.
//

#import "ImportSelectView.h"

@implementation ImportSelectView

- (instancetype)init {
    
    self = [super init];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.mas_left).offset(20);
            make.centerY.mas_equalTo(self);
            make.width.mas_equalTo(70);
        }];
        
        
        _lineImageView = [[UIImageView alloc] init];
        _lineImageView.backgroundColor = ThemeMaoLineColor;
        [self addSubview:_lineImageView];
        [_lineImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.mas_left).offset(20);
            make.right.mas_equalTo(self.mas_right).offset(-20);
            make.bottom.mas_equalTo(self);
            make.height.mas_equalTo(0.5f);
        }];
        
        UIImageView *rightImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ic_chevron_right"]];
        [rightImageView setContentMode:UIViewContentModeScaleAspectFit];
        [self addSubview:rightImageView];
        [rightImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(self);
            make.right.mas_equalTo(self.mas_right).offset(-10);
            make.size.mas_equalTo(CGSizeMake(18, 18));
        }];
        
        [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.mas_equalTo(self);
            make.right.mas_equalTo(self.mas_right).offset(-30);
            make.left.mas_equalTo(self.titleLabel.mas_right);
        }];
        
    }
    return self;
}


- (UILabel *)titleLabel {
    
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = HexColor(0x333333);
        _titleLabel.font = [UIFont systemFontOfSize:14];
        
        
        [self addSubview:_titleLabel];
    }
    return _titleLabel;
}
- (UILabel *)rightLabel {
    
    if (!_rightLabel) {
        _rightLabel = [[UILabel alloc] init];
        _rightLabel.textColor = HexColor(0xaaaaaa);
        _rightLabel.font = [UIFont systemFontOfSize:14];
        _rightLabel.text = @"请选择";
        _rightLabel.textAlignment = NSTextAlignmentRight;
        
        [self addSubview:_rightLabel];
    }
    return _rightLabel;
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
